<html>
<head><meta charset="utf-8"><title>Bikeshed renaming of `reserved_prefix` lint name · edition 2021 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/index.html">edition 2021</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html">Bikeshed renaming of `reserved_prefix` lint name</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="244328753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244328753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244328753">(Jun 29 2021 at 18:48)</a>:</h4>
<p>The <a href="https://github.com/rust-lang/rust/pull/86717">lint renaming PR</a> has a discussion on what to call the lint that is currently known as <code>reserved_prefix</code>. I'd like this to be a place to bikeshed the new name.<br>
Some of the current possibilities: </p>
<ul>
<li><code>rust_2021_incompatible_prefix</code></li>
<li><code>rust_2021_prefix</code></li>
<li><code>reserved_token_prefixes</code></li>
<li><code>future_prefixes</code></li>
<li><code>future_prefix_syntax</code></li>
<li><code>future_possible_prefix</code></li>
</ul>



<a name="244330251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244330251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244330251">(Jun 29 2021 at 18:59)</a>:</h4>
<p>I don't think it should have "2021" in it.</p>



<a name="244330265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244330265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244330265">(Jun 29 2021 at 18:59)</a>:</h4>
<p>We're reserving this syntax for the future.</p>



<a name="244330309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244330309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244330309">(Jun 29 2021 at 18:59)</a>:</h4>
<p>well in the future it won't be a lint, it will just be an error, so nobody will be seeing the name</p>



<a name="244330426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244330426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244330426">(Jun 29 2021 at 19:00)</a>:</h4>
<p>unless you're on an earlier edition, in which case it might be useful in understanding why and when it became a lint</p>



<a name="244330472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244330472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244330472">(Jun 29 2021 at 19:00)</a>:</h4>
<p>That's fair.</p>



<a name="244330509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244330509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244330509">(Jun 29 2021 at 19:01)</a>:</h4>
<p>I'm assuming that the description of the lint will make that pretty clear regardless, but OK, I can see why it'd be useful to have in the name.</p>



<a name="244331240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244331240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244331240">(Jun 29 2021 at 19:06)</a>:</h4>
<p>I don't tend to agree to the objection of "reserved" in "reserved_prefix"; they're reserved for use by the language, and it's no contradiction if the language decides to later exercise that reservation. I find "token" pretty jargony. "future" and "possible" would be objected to by anyone that rejected "reserved", on the same grounds. You can call it "literal_prefixes" if you don't mind lumping in identifiers as literals.</p>



<a name="244331345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244331345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244331345">(Jun 29 2021 at 19:07)</a>:</h4>
<p>as for the "rust_2021" prefix on the name, I tend to like it, but it should be consistent among all the edition lints</p>



<a name="244333301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244333301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jam1garner <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244333301">(Jun 29 2021 at 19:20)</a>:</h4>
<p>I definitely like "future_prefix_syntax". it's not too jargon-y, isn't rooted in 2021 edition specifically. I think the main downside to it is that (a) <code>future</code> is kinda an overloaded term bc async and (b) the lack of "reserved" won't really tie it back to existing documentation. This makes it a bit hard to google, but I imagine that'd be resolved by newer documentation getting indexed by search engines...</p>



<a name="244333421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244333421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jam1garner <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244333421">(Jun 29 2021 at 19:21)</a>:</h4>
<p>So I guess what I'm saying is my support of that choice is a bit dependent on "future prefix syntax" being the Official Name™ so it'll actually be discoverable</p>



<a name="244337428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244337428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244337428">(Jun 29 2021 at 19:52)</a>:</h4>
<p>the lint is specifically part of rust_2021_compatibility and also mentions Rust 2021 in its message. we wouldn't reuse the same lint if we add a new type of prefix in rust 2024 or something.</p>



<a name="244337567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244337567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244337567">(Jun 29 2021 at 19:53)</a>:</h4>
<p>having it in the name sounds fine, good even. it's a lint you can enable in older editions to warn about syntax that will be interpreted as a prefix in edition 2021 but currently isn't</p>



<a name="244346434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244346434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jam1garner <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244346434">(Jun 29 2021 at 20:55)</a>:</h4>
<p>ah I was missing that context! makes sense why 2021 was being considered in the name</p>



<a name="244351157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244351157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244351157">(Jun 29 2021 at 21:35)</a>:</h4>
<p>rust_2021_prefix_syntax?</p>



<a name="244351554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244351554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244351554">(Jun 29 2021 at 21:39)</a>:</h4>
<p>rust_2021_token_prefixes</p>



<a name="244351705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244351705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244351705">(Jun 29 2021 at 21:41)</a>:</h4>
<p>Seems like rust_2021 is agreed on. Leaning toward token_prefixes since it seems the most descriptive.</p>



<a name="244352258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244352258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244352258">(Jun 29 2021 at 21:46)</a>:</h4>
<p>syntax_that_will_be_tokenized_differently_in_rust_2021</p>



<a name="244374670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244374670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244374670">(Jun 30 2021 at 03:49)</a>:</h4>
<p>FWIW, I'd suggest not using "future", because I think people may think it has something to do with futures.</p>



<a name="244374761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244374761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244374761">(Jun 30 2021 at 03:52)</a>:</h4>
<p>/me likes <code>rust_2021_reserved_prefix</code> or <code>rust_2021_reserved_syntax</code>, or the same without <code>rust_2021_</code>; all of those seem fine.</p>



<a name="244378131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244378131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244378131">(Jun 30 2021 at 05:07)</a>:</h4>
<p>i don't think it should contain 'reserved', because this syntax isn't going to be reserved forever. we will be assigning meaning to it at some point. then the lint will warn about f"" or k#yeet not because it is reserved, but because f"" and k#yeet has meaning in rust 2021</p>



<a name="244378143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244378143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244378143">(Jun 30 2021 at 05:07)</a>:</h4>
<p>rust_2021_incompatible_prefix</p>



<a name="244378216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244378216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244378216">(Jun 30 2021 at 05:09)</a>:</h4>
<p>yes, that was my original suggestion on the PR</p>



<a name="244378288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244378288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244378288">(Jun 30 2021 at 05:10)</a>:</h4>
<p>hard to beat that one</p>



<a name="244378933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244378933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244378933">(Jun 30 2021 at 05:24)</a>:</h4>
<p>(:</p>



<a name="244392229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244392229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244392229">(Jun 30 2021 at 08:34)</a>:</h4>
<p>I guess it seems to me like the syntax is always our reserved syntax, even if in the future we assign a meaning to it. Just as <code>_[A-Z][A-Za-z0-9]</code> is reserved syntax in C, and there are also various identifiers defined with that prefix.</p>



<a name="244393004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244393004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244393004">(Jun 30 2021 at 08:42)</a>:</h4>
<p>I'd think that once the syntax is being used for something, the error should go away or at least change? Like, if we add <code>k#</code>, and you use it with something that isn't a keyword, that's an error, but a different one from the reserved prefixes error?</p>



<a name="244393239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244393239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244393239">(Jun 30 2021 at 08:45)</a>:</h4>
<p>If that's the case, the lint would only apply to things that are currently reserved prefixes, and other lints or errors would apply to prefixes that were in use.</p>



<a name="244398316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244398316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244398316">(Jun 30 2021 at 09:37)</a>:</h4>
<p>I'm personally in favor of <code>rust_2021_token_prefixes</code>- it's descriptive of what type of prefixes, rust_2021 implies that these are used in Rust 2021 but not before (meaning reserved and incompatible are redundant and not necessary).</p>



<a name="244419400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244419400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244419400">(Jun 30 2021 at 13:02)</a>:</h4>
<p>Starting to like rust_2021_incompatible_prefix. It emphasizes "this will be an error" rather than "this will be parsed as a prefix". I think the former statement is more accurate or at least more important. I like incompatible more than reserved because reserved sounds more like a property of Rust syntax in general but incompatible describes a specific instance of code.</p>



<a name="244424641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244424641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244424641">(Jun 30 2021 at 13:39)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name/near/244392229">said</a>:</p>
<blockquote>
<p>I guess it seems to me like the syntax is always our reserved syntax, even if in the future we assign a meaning to it. Just as <code>_[A-Z][A-Za-z0-9]</code> is reserved syntax in C, and there are also various identifiers defined with that prefix.</p>
</blockquote>
<p>the term 'reserved' is used there because people can define their own identifiers like that. that doesn't apply here, because it's either a syntax error or a new valid syntax with valid meaning. it's not that we're warning that you shouldn't use this because we <em>might</em> add something that would then conflict. we're warning because it's a syntax error in rust 2021 (or at some point, a valid new thing).</p>



<a name="244425677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244425677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244425677">(Jun 30 2021 at 13:46)</a>:</h4>
<p>otherwise you could argue that <code>123</code> is reserved syntax because it has a meaning. all syntax is reserved for us. 'reserved syntax' just means 'invalid syntax on purpose' so we have a place to define new syntax without breaking things. the warning is that the syntax changed (to make <code>f".."</code> invalid, or later that <code>f".."</code> has a new meaning).</p>



<a name="244425924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244425924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244425924">(Jun 30 2021 at 13:48)</a>:</h4>
<p>the lint doesn't even mention the word 'reserved' at all: "detects identifiers that will be parsed as a prefix instead in Rust 2021". the warning message is "unknown prefix" and the suggestion says "insert whitespace here to avoid this being parsed as a prefix in Rust 2021"</p>



<a name="244427581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244427581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244427581">(Jun 30 2021 at 14:00)</a>:</h4>
<p>I've updated the PR with <code>rust_2021_token_prefixes</code>. Happy to change it again though if we come up with a better way of deciding which name.</p>



<a name="244427662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244427662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244427662">(Jun 30 2021 at 14:01)</a>:</h4>
<p><span class="user-mention" data-user-id="310399">@Mara</span> we may also want to rethink <code>future_prelude_collisions</code> given some of the concerns around the use of the word "future"</p>



<a name="244429264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244429264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244429264">(Jun 30 2021 at 14:12)</a>:</h4>
<p>i think a key part that's easily missed is that <em>all</em> of these new edition lints are for Rust 2015/2018 and warn about things that would work differently if the code would be interpreted Rust 2021.  so if you deny() that, you deny things that are incompatible with the new edition, even though it's currently not yet interpreted that way. so the prefix warning warns about identifiers that will no longer be parsed/tokenized as identifiers when parsed in Rust 2021. these lints do not run in Rust 2021 code. <code>deny(rust_2021_prefixes)</code> makes it sound like that'd deny <code>f""</code> <em>in Rust 2021</em>. but there it's just a syntax error or a format string. instead, it denies <code>f""</code> (two tokens) in Rust 2015/2018, because that syntax is changing and incompatible with Rust 2021.</p>



<a name="244429360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244429360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244429360">(Jun 30 2021 at 14:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224872">rylev</span> <a href="#narrow/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name/near/244427662">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="310399">Mara</span> we may also want to rethink <code>future_prelude_collisions</code> given some of the concerns around the use of the word "future"</p>
</blockquote>
<p>yes. s/future/rust_2021/</p>



<a name="244429484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244429484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244429484">(Jun 30 2021 at 14:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="310399">Mara</span> <a href="#narrow/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name/near/244429264">said</a>:</p>
<blockquote>
<p>i think a key part that's easily missed is that <em>all</em> of these new edition lints are for Rust 2015/2018 and warn about things that would work differently if the code would be interpreted Rust 2021.  so if you deny() that, you deny things that are incompatible with the new edition, even though it's currently not yet interpreted that way. so the prefix warning warns about identifiers that will no longer be parsed/tokenized as identifiers when parsed in Rust 2021. these lints do not run in Rust 2021 code. <code>deny(rust_2021_prefixes)</code> makes it sound like that'd deny <code>f""</code> <em>in Rust 2021</em>. but there it's just a syntax error or a format string. instead, it denies <code>f""</code> (two tokens) in Rust 2015/2018, because that syntax is changing and incompatible with Rust 2021.</p>
</blockquote>
<p>I like this reasoning. I can see how <code>incompatible</code> helps with that</p>



<a name="244430491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244430491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244430491">(Jun 30 2021 at 14:20)</a>:</h4>
<p>Note that hitting this ought to be super rare, so a terse lint name will come with no true benefit but with the obvious drawback of terseness.<br>
I agree that the name <em>future</em> ought to be avoided, and that the lint name ought to follow the lint naming scheme (which <code>rust_2018_idioms</code> did not, for instance).<br>
<code>rust_2021_incompatible_prefix</code> is thus the <em>shortest</em> name I'd go for, and, as mentioned, we don't need the lint name to be "that" short for something statistically never happening, so I'd personally go as far as using: <code>rust_2021_incompatible_prefix_tokenization</code> (or <code>…_prefix_parsing</code> to use more layman terms than <em>tokenization</em>, as <span class="user-mention" data-user-id="256342">@bstrie</span> pointed out).</p>



<a name="244432088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244432088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244432088">(Jun 30 2021 at 14:31)</a>:</h4>
<p>if we want to get real pedantic, one could argue that in the editions where the lint fires it's <em>not</em> a prefix, just an identifier. so it's not a prefix that's incompatible with the new edition, it's a identifier+literal-without-whitespace combination that is incompatible with the new edition.  that'd lead to <code>rust_2021_incompatible_syntax</code> or <code>rust_2021_prefix_incompatible_syntax</code>: "incompatible with Rust 2021 prefixes" and not "prefix incompatible with Rust 2021" ;)</p>



<a name="244549455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244549455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244549455">(Jul 01 2021 at 11:07)</a>:</h4>
<p>The issue is that the snake casing doesn't make it easy to know which terms clump together. <code>rust_2021_prefix_incompatible_syntax</code> can be interpreted as "rust 2021 syntax which is prefix incompatible" or "incompatible syntax to rust 2021 prefixes".</p>



<a name="244549546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/Bikeshed%20renaming%20of%20%60reserved_prefix%60%20lint%20name/near/244549546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/Bikeshed.20renaming.20of.20.60reserved_prefix.60.20lint.20name.html#244549546">(Jul 01 2021 at 11:08)</a>:</h4>
<p>Does <code>rust_2021_prefixes_incompatible_syntax</code> (notice prefixes vs prefix) help here?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>